<?php 
$postUrl = Router::url(array('controller' => 'posts', 'action' => 'show', $post['Post']['id']));
?>
<article class="article">
	<header>
		<h2>
			<?php 
			if (isset($show) && $show) {
				echo $post['Post']['title'];
			}
			else {
				echo $this->Html->link($post['Post']['title'], $postUrl);
			}
			?>
		</h2>
	</header>
	<p><?php echo $post['Post']['description']; ?></p>
	<?php 
	if (!empty($post['Post']['image'])) {
		echo $this->Html->div('article-img', $this->Html->image(MEDIA_IMAGE_PATH_HTML . 'large/' . $post['Post']['image'], array(
				'alt' => $post['Post']['title']
			))
		);
	}
	?>
	<footer class="clearfix">
		<div class="article-social pull-left">
			<ul class="clearfix">
				<li>
					<div class="fb-like" data-href="<?php echo $postUrl; ?>" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
				</li>
			</ul>
		</div>
		<div class="pull-left">
			<?php // echo $this->Html->link('+', array('controller'=>'posts', 'action'=>'vote', 1))?>
		</div>
		<div class="article-time pull-right">
			<time datetime="<?php echo $post['Post']['created']; ?>">
				<?php echo date("d.m.Y", strtotime($post['Post']['created'])); ?>
			</time>
		</div>
	</footer>
</article>
